package com.heima.api.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.media.dtos.WmNewsDto;
import com.heima.model.media.dtos.WmNewsPageReqDto;
import com.heima.model.media.pojos.WmNews;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 自媒体文章接口
 */
@Api(tags = "关于自媒体文章的api")
public interface WmNewsControllerApi {

    /**
     * 分页带条件查询自媒体文章列表
     * @param wmNewsPageReqDto
     * @return
     */
    @ApiOperation("查找所有自媒体文章")
    ResponseResult findList(WmNewsPageReqDto wmNewsPageReqDto);
    @ApiOperation("上传文章")
    ResponseResult summitNews(WmNewsDto dto);
    @ApiOperation("根据id查询")
    ResponseResult findWmNewsById(Integer id);
    @ApiOperation("根据id删除")
    ResponseResult delNews(Integer id);
    @ApiOperation("上架、下架")
    ResponseResult downOrUp(WmNewsDto dto);
    @ApiOperation("根据id查询WmNews")
    WmNews findById(@PathVariable("id") Integer id);
    @ApiOperation("更新WmNews")
    ResponseResult updateWmNews(WmNews wmNews);
}